package com.asseco.mio.codex.controllers;

import com.asseco.mio.DisciplineProcedure;
import com.asseco.mio.core.webapp.controller.*;
import org.appfuse.service.GenericManager;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/disciplineprocedures*")
public class DisciplineProcedureController {
    private GenericManager<DisciplineProcedure, Long> disciplineProcedureManager;

    @Autowired
    public void setDisciplineProcedureManager(@Qualifier("disciplineProcedureManager") GenericManager<DisciplineProcedure, Long> disciplineProcedureManager) {
        this.disciplineProcedureManager = disciplineProcedureManager;
    }

    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView handleRequest()
    throws Exception {
        return new ModelAndView().addObject(disciplineProcedureManager.getAll());
    }
}
